exporting full device now works
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
int blkif_ioctl(struct inode *inode, struct file *filep,
unsigned command, unsigned long argument)
{
- int i;
- /* struct gendisk *gd = inode->i_bdev->bd_disk; */
+ int i;
DPRINTK_IOCTL("command: 0x%x, argument: 0x%lx, dev: 0x%04x\n",
command, (long)argument, inode->i_rdev);
if ( !bd )
goto out;
- down(&bd->bd_sem);
-
gd = xlvbd_alloc_gendisk(mi, minor, disk);
if ( !gd )
goto out_bd;
list_add(&new->list, list);
out_bd:
- up(&bd->bd_sem);
bdput(bd);
out:
return 0;
if ( !bd )
return -1;
- down(&bd->bd_sem);
-
gd = get_gendisk(device, &unused);
di = gd->private_data;
xlvbd_device_free(disk);
out:
- up(&bd->bd_sem);
bdput(bd);
return ret;
}
if ( !bd )
return -1;
- down(&bd->bd_sem);
-
gd = get_gendisk(device, &unused);
set_capacity(gd, disk->capacity);
ldisk->capacity = disk->capacity;
- up(&bd->bd_sem);
bdput(bd);
return 0;